package com.j180.springboot_2.controller;

import com.j180.springboot_2.bean.Person;
import com.j180.springboot_2.service.IPersonService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/person")
public class PersonController {
     @Resource
    private IPersonService iPersonService;

     @GetMapping("/showAll")
    public List<Person> showAllInfo(){

         return  iPersonService.showALL();
    }
}


